import datetime
from dataclasses import dataclass, field

from poker_bot.core.models.enums.user import LangCode, UserRole


@dataclass(frozen=True)
class UserDTO:
    id: int
    telegram_id: int
    username: str
    role: UserRole
    referrer_id: int | None = None
    is_subscribed: bool = field(default=False)
    lang_code: LangCode | None = None
    selected_account_id: int | None = None
    created_at: datetime.datetime | None = None


@dataclass(frozen=True)
class UserWithDepositsDTO(UserDTO):
    deposits_count: int | None = None
